package com.tcj.blog.service.impl;

import com.tcj.blog.domain.User;
import com.tcj.blog.dto.LoginUser;
import com.tcj.blog.mapper.UserMapper;
import com.tcj.blog.service.IUserService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author Tcj
 * @since 2020-09-30
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IUserService {
    @Autowired
    private UserMapper userMapper;


    @Override
    public User loginUser(LoginUser loginUser) {
        return userMapper.loginUser(loginUser);
    }

    @Override
    public boolean checkAcc(String account) {
        return userMapper.checkAcc(account)>0;
    }

    @Override
    public boolean changeUser(User user) {
        return userMapper.changeUser(user) >0;
    }

}
